package com.darren.framework.Exception;

import com.darren.framework.utils.JWTUtil;

/**
 * @Description: 自定义Token异常
 * @Author: 周金涛
 * @Date: 2019-09-19 12:38:41
 */
public class TokenException extends RuntimeException{

    private static final long serialVersionUID = 1L;

    private Integer status;

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public TokenException(Integer status, String message){
        super(message);
        this.status = status;
    }

    public TokenException(JWTUtil.TokenStatus tokenStatus){
        super(tokenStatus.getMessage());
        this.status = tokenStatus.getCode();
    }

}
